package Test6;
//定义一个Person类，含姓名，性别，年龄等字段；集成Person；类设计Teacher类，增加工号、薪水、职称，部门等字段；
// 集成Person类设计Student类，增加学号，入学时间，专业等字段。定义各类的构造方法和toString()方法。
public class Person {
    private String name;
    private String sex;
    private int age;

    public Person() {
    }
    public Person(String name, String sex, int age) {
        this.name = name;
        this.sex = sex;
        this.age = age;
    }

    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
    public String getSex() {
        return sex;
    }
    public void setSex(String sex) {
        this.sex = sex;
    }
    public int getAge() {
        return age;
    }
    public void setAge(int age) {
        this.age = age;
    }
}
